Produced by Araxis Merge on 2024-03-04 14:38:49 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | /Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme v4.0.7/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product | list.phtml | 2023-10-25 03:49:47 +0000 |
| 2 | /Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme v4.0.8/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product | list.phtml | 2024-03-02 11:14:48 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 19 | 962 |
| Changed | 10 | 232 |
| Inserted | 8 | 116 |
| Removed | 0 | 0 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | <?php | 1 | <?php | |||
| 2 | /** | 2 | /** | |||
| 3 | * Copyright © 2015 Magento. All rights reserved. | 3 | * Copyright © 2015 Magento. All rights reserved. | |||
| 4 | * See COPYING.txt for license details. | 4 | * See COPYING.txt for license details. | |||
| 5 | */ | 5 | */ | |||
| 6 | use Magento\Framework\App\Action\Action; | 6 | use Magento\Framework\App\Action\Action; | |||
| 7 | 7 | |||||
| 8 | // @codingStandardsIgnoreFile | 8 | // @codingStandardsIgnoreFile | |||
| 9 | 9 | |||||
| 10 | ?> | 10 | ?> | |||
| 11 | <?php | 11 | <?php | |||
| 12 | /** | 12 | /** | |||
| 13 | * Product list template | 13 | * Product list template | |||
| 14 | * | 14 | * | |||
| 15 | * @var $block \Magento\Catalog\Block\Product\ListProduct | 15 | * @var $block \Magento\Catalog\Block\Product\ListProduct | |||
| 16 | */ | 16 | */ | |||
| 17 | ?> | 17 | ?> | |||
| 18 | <?php | 18 | <?php | |||
| 19 | $_productCollection = $block->getLoadedProductCollection(); | 19 | $_productCollection = $block->getLoadedProductCollection(); | |||
| 20 | $_helper = $this->helper('Magento\Catalog\Helper\Output'); | 20 | $_helper = $this->helper('Magento\Catalog\Helper\Output'); | |||
| 21 | $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); | 21 | $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); | |||
| 22 | 22 | |||||
| 23 | // Daily deal Helper | 23 | // Daily deal Helper | |||
| 24 | $_dailydealhelper =$this->helper('Smartwave\Dailydeals\Helper\Data'); | 24 | $_dailydealhelper =$this->helper('Smartwave\Dailydeals\Helper\Data'); | |||
| 25 | 25 | |||||
| 26 | $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); | 26 | $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); | |||
| 27 | 27 | |||||
| 28 | $_category_config = $_portohelper->getConfig('porto_settings/category'); | 28 | $_category_config = $_portohelper->getConfig('porto_settings/category'); | |||
| 29 | $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); | 29 | $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); | |||
| 30 | $_product_label_config = $_portohelper->getConfig('porto_settings/product_label'); | 30 | $_product_label_config = $_portohelper->getConfig('porto_settings/product_label'); | |||
| 31 | $_lazyload = $_portohelper->getConfig('porto_settings/optimization/lazyload'); | 31 | $_lazyload = $_portohelper->getConfig('porto_settings/optimization/lazyload'); | |||
| 32 | $_inscrollAjax = $_portohelper->getConfig('layered_navigation/general/ajax_enable'); | 32 | $_inscrollAjax = $_portohelper->getConfig('layered_navigation/general/ajax_enable'); | |||
| 33 | $_inscroll = $_portohelper->getConfig('layered_navigation/general/infinite_scroller'); | 33 | $_inscroll = $_portohelper->getConfig('layered_navigation/general/infinite_scroller'); | |||
| 34 | $_inscroll_mode = $_portohelper->getConfig('layered_navigation/general/infinite_mode'); | 34 | $_inscroll_mode = $_portohelper->getConfig('layered_navigation/general/infinite_mode'); | |||
| 35 | ||||||
| 36 | $_content_pos1 = isset($_category_grid_config['product_content_pos1']) ? $_category_grid_config['product_content_pos1'] : 'left'; | |||||
| 37 | $_button_pos = isset($_category_grid_config['product_button_pos']) ? $_category_grid_config['product_button_pos'] : 'top'; | |||||
| 38 | $_button_action = isset($_category_grid_config['product_button_action']) ? $_category_grid_config['product_button_action'] : 'top'; | |||||
| 39 | $_icon_only1 = isset($_category_grid_config['product_icon_only1']) ? $_category_grid_config['product_icon_only1'] : '0'; | |||||
| 40 | $_icon_only2 = isset($_category_grid_config['product_icon_only2']) ? $_category_grid_config['product_icon_only2'] : '0'; | |||||
| 41 | $_block_pos = isset($_category_grid_config['product_block_pos']) ? $_category_grid_config['product_block_pos'] : 'default'; | |||||
| 42 | $_quantity_pos = isset($_category_grid_config['product_quantity_pos']) ? $_category_grid_config['product_quantity_pos'] : 'below'; | |||||
| 43 | $_content_pos2 = isset($_category_grid_config['product_content_pos2']) ? $_category_grid_config['product_content_pos2'] : 'default'; | |||||
| 44 | $_link_pos = isset($_category_grid_config['product_link_pos']) ? $_category_grid_config['product_link_pos'] : 'default'; | |||||
| 45 | $_box_style = isset($_category_grid_config['product_box_style']) ? $_category_grid_config['product_box_style'] : 'box_shadow'; | |||||
| 35 | ?> | 46 | ?> | |||
| 36 | <?php $iterator = 1; ?> | 47 | <?php $iterator = 1; ?> | |||
| 37 | <?php if (!$_productCollection->count()): ?> | 48 | <?php if (!$_productCollection->count()): ?> | |||
| 38 | <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div> | 49 | <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div> | |||
| 39 | <?php else: ?> | 50 | <?php else: ?> | |||
| 40 | <?php echo $block->getToolbarHtml() ?> | 51 | <?php echo $block->getToolbarHtml() ?> | |||
| 41 | <?php echo $block->getAdditionalHtml() ?> | 52 | <?php echo $block->getAdditionalHtml() ?> | |||
| 42 | <?php | 53 | <?php | |||
| 43 | if ($block->getMode() == 'grid') { | 54 | if ($block->getMode() == 'grid') { | |||
| 44 | $viewMode = 'grid'; | 55 | $viewMode = 'grid'; | |||
| 45 | $image = 'category_page_grid'; | 56 | $image = 'category_page_grid'; | |||
| 46 | $hover_image = 'category_page_grid-hover'; | 57 | $hover_image = 'category_page_grid-hover'; | |||
| 47 | $showDescription = false; | 58 | $showDescription = false; | |||
| 48 | $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; | 59 | $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; | |||
| 49 | $columns = 'columns'.$_category_grid_config['columns']; | 60 | $columns = 'columns'.$_category_grid_config['columns']; | |||
| 50 | $product_type = $_category_grid_config['product_type']; | 61 | $product_type = $_category_grid_config['product_type']; | |||
| 51 | if($product_type == null) { | 62 | if($product_type == null) { | |||
| 52 | $product_type = 1; | 63 | $product_type = 1; | |||
| 53 | } | 64 | } | |||
| 54 | } else { | 65 | } else { | |||
| 55 | $viewMode = 'list'; | 66 | $viewMode = 'list'; | |||
| 56 | $image = 'category_page_list'; | 67 | $image = 'category_page_list'; | |||
| 57 | $hover_image = 'category_page_list-hover'; | 68 | $hover_image = 'category_page_list-hover'; | |||
| 58 | $showDescription = true; | 69 | $showDescription = true; | |||
| 59 | $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::FULL_VIEW; | 70 | $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::FULL_VIEW; | |||
| 60 | $columns = ''; | 71 | $columns = ''; | |||
| 61 | $product_type = 0; | 72 | $product_type = 0; | |||
| 62 | } | 73 | } | |||
| 63 | $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; | 74 | $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; | |||
| 64 | $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; | 75 | $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; | |||
| 65 | $aspect_ratio = $_category_config['aspect_ratio']; | 76 | $aspect_ratio = $_category_config['aspect_ratio']; | |||
| 66 | if($aspect_ratio) | 77 | if($aspect_ratio) | |||
| 67 | $image_height = $image_width; | 78 | $image_height = $image_width; | |||
| 68 | ?> | 79 | ?> | |||
| 69 | <div class="products wrapper <?php echo $viewMode; ?> <?php echo $columns; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>"> | 80 | <div class="products wrapper <?php echo $viewMode; ?> <?php echo $columns; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>"> | |||
| 70 | <?php $iterator = 1; ?> | 81 | <?php $iterator = 1; ?> | |||
| 71 | <ol class="filterproducts products list items product-items"> | 82 | <ol class="filterproducts products list items product-items"> | |||
| 72 | <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> | 83 | <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> | |||
| 73 | <?php foreach ($_productCollection as $_product): ?> | 84 | <?php foreach ($_productCollection as $_product): ?> | |||
| 74 | <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?> | 85 | <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?> | |||
| 75 | <div class="product-item-info type<?php echo $product_type; ?> | 86 | <?php | |||
| 76 | <?php // Product Image ?> | 87 | $newType = array("13", "14", "15", "16", "17", "18", "19", "20"); | |||
| 77 | <div class="product photo product-item-photo"> | 88 | $_type_class = ''; | |||
| 78 | <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1" | 89 | $_content_pos1 = ''; | |||
| 90 | if(in_array($product_type, $newType)) { | |||||
| 91 | $_content_pos1 = ' text-'.$_content_pos1; | |||||
| 92 | $_type_class = ' product-type-advanced'; | |||||
| 93 | if($product_type == '15'){ | |||||
| 94 | $_type_class = ' product-type-advanced effect-ovdefault'; | |||||
| 95 | if($_button_action == 'top'){ | |||||
| 96 | $_content_pos1 = ' text-center'; | |||||
| 97 | } | |||||
| 98 | if($_button_action == 'hide'){ | |||||
| 99 | $_content_pos1 = ' text-center hide-actions'; | |||||
| 100 | } | |||||
| 101 | } | |||||
| 102 | if($product_type == '16'){ | |||||
| 103 | $_type_class = ' product-type-advanced effect-hddf'.' box-'.$_block_pos; | |||||
| 104 | } | |||||
| 105 | if($product_type == '18'){ | |||||
| 106 | $_type_class = ' product-type-advanced effect-detailimg'; | |||||
| 107 | $_content_pos1 = ' text-left'; | |||||
| 108 | if($_content_pos2 == 'top'){ | |||||
| 109 | $_type_class = ' product-type-advanced effect-detailimg actions-bottom'; | |||||
| 110 | } | |||||
| 111 | if($_content_pos2 == 'center'){ | |||||
| 112 | $_content_pos1 = ' text-center'; | |||||
| 113 | $_type_class = ' product-type-advanced effect-detailimg actions-center'; | |||||
| 114 | } | |||||
| 115 | if($_content_pos2 == 'bottom'){ | |||||
| 116 | $_type_class = ' product-type-advanced effect-detailimg actions-top'; | |||||
| 117 | } | |||||
| 118 | } | |||||
| 119 | if($product_type == '19'){ | |||||
| 120 | $_type_class = ' product-type-advanced effect-cartlink'; | |||||
| 121 | if($_link_pos == 'image') { | |||||
| 122 | $_type_class = ' product-type-advanced effect-cartlink cartlink-image'; | |||||
| 123 | } | |||||
| 124 | $_content_pos1 = ' text-left'; | |||||
| 125 | } | |||||
| 126 | if($product_type == '20'){ | |||||
| 127 | $_content_pos1 = ' text-center'; | |||||
| 128 | if($_box_style == 'box_shadow') { | |||||
| 129 | $_type_class .= ' product-type-advanced effect-bheshadow'; | |||||
| 130 | } | |||||
| 131 | if($_box_style == 'box_full') { | |||||
| 132 | $_type_class .= ' product-type-advanced effect-bhesfd'; | |||||
| 133 | $_content_pos1 = ' text-left'; | |||||
| 134 | } | |||||
| 135 | if($_box_style == 'box_border') { | |||||
| 136 | $_type_class .= ' product-type-advanced effect-bheborder'; | |||||
| 137 | } | |||||
| 138 | if($_box_style == 'box_border_padding') { | |||||
| 139 | $_type_class .= ' product-type-advanced effect-bhebrspace'; | |||||
| 140 | } | |||||
| 141 | } | |||||
| 142 | } | |||||
| 143 | ?> | |||||
| 144 | <div class="product-item-info type<?php echo $product_type; ?><?= $_content_pos1;?> porto-tb-item type-product has-post-thumbnail product-type-simple" data-container="product-grid"> | |||||
| 145 | <div class="porto-section<?=$_type_class?> p-0"> | |||||
| 146 | <?php if($product_type == '20' && $_box_style == 'box_full'):?><div class="content-shadow"></div><?php endif;?> | |||||
| 147 | <div class="product photo product-item-photo<?php if(in_array($product_type, $newType)):?> porto-tb-featured-image tb-image-type-hover<?php endif;?> product-image"> | |||||
| 148 | <div class="porto-tb-featured-image tb-image-type-hover"> | |||||
| 149 | <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1" class="post featured image"> | |||||
| 79 | <?php | 150 | <?php | |||
| 80 | if($aspect_ratio) | 151 | if($aspect_ratio) | |||
| 81 | $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | 152 | $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | |||
| 82 | else | 153 | else | |||
| 83 | $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); | 154 | $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); | |||
| 84 | $productImageUrl = $productImage->getUrl(); | 155 | $productImageUrl = $productImage->getUrl(); | |||
| 85 | ?> | 156 | ?> | |||
| 86 | <img class="product-image-photo default_image <?php if(!$_lazyload): ?>porto-lazyload<?php endif;?>" <?php if(!$_lazyload): ?>data-<?php endif; ?>src="<?php echo $productImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productImage->getLabel();?>"/> | 157 | <img class="product-image-photo default_image <?php if(!$_lazyload): ?>porto-lazyload<?php endif;?>" <?php if(!$_lazyload): ?>data-<?php endif; ?>src="<?php echo $productImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productImage->getLabel();?>"/> | |||
| 87 | <?php if($_category_config['alternative_image']): ?> | 158 | <?php if($_category_config['alternative_image']): ?> | |||
| 88 | <?php | 159 | <?php | |||
| 89 | if($aspect_ratio) | 160 | if($aspect_ratio) | |||
| 90 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | 161 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | |||
| 91 | else | 162 | else | |||
| 92 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); | 163 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); | |||
| 93 | $productHoverImageUrl = $productHoverImage->getUrl(); | 164 | $productHoverImageUrl = $productHoverImage->getUrl(); | |||
| 94 | ?> | 165 | ?> | |||
| 95 | <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> | 166 | <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> | |||
| 96 | <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productHoverImage->getLabel();?>"/> | 167 | <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productHoverImage->getLabel();?>"/> | |||
| 97 | <?php endif; ?> | 168 | <?php endif; ?> | |||
| 98 | <?php endif; ?> | 169 | <?php endif; ?> | |||
| 99 | </a> | 170 | </a> | |||
| 100 | <?php | 171 | <?php | |||
| 101 | $product_label = ""; | 172 | $product_label = ""; | |||
| 102 | if($_product_label_config['sale_label']) { | 173 | if($_product_label_config['sale_label']) { | |||
| 103 | if ($percentage = $_portohelper->getPercentage($_product)) { | 174 | if ($percentage = $_portohelper->getPercentage($_product)) { | |||
| 104 | if($_product_label_config['sale_label_percent']) { | 175 | if($_product_label_config['sale_label_percent']) { | |||
| 105 | $product_label .= '<div class="product-label sale-label">'.$percentage.'%'.'</div>'; | 176 | $product_label .= '<div class="product-label sale-label">'.$percentage.'%'.'</div>'; | |||
| 106 | } else { | 177 | } else { | |||
| 107 | $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>'; | 178 | $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>'; | |||
| 108 | } | 179 | } | |||
| 109 | } | 180 | } | |||
| 110 | } | 181 | } | |||
| 111 | if($_product_label_config['new_label']) { | 182 | if($_product_label_config['new_label']) { | |||
| 112 | $now = date("Y-m-d"); | 183 | $now = date("Y-m-d"); | |||
| 113 | $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10); | 184 | $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10); | |||
| 114 | $newsTo= substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10); | 185 | $newsTo= substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10); | |||
| 115 | 186 | |||||
| 116 | if ($newsTo != '' || $newsFrom != ''){ | 187 | if ($newsTo != '' || $newsFrom != ''){ | |||
| 117 | if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) { | 188 | if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) { | |||
| 118 | $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>'; | 189 | $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>'; | |||
| 119 | } | 190 | } | |||
| 120 | } | 191 | } | |||
| 121 | } | 192 | } | |||
| 122 | if($product_label) | 193 | if($product_label) | |||
| 123 | echo '<div class="product-labels">'.$product_label.'</div>'; | 194 | echo '<div class="product-labels">'.$product_label.'</div>'; | |||
| 124 | ?> | 195 | ?> | |||
| 125 | <?php if($product_type == 3 || | 196 | <?php | |||
| 126 | <div class="product-item-inner"> | 197 | $_show_actions_top = false; | |||
| 127 | <div class="product actions product-item-actions"> | 198 | $_product_inner_class = ''; | |||
| 199 | if(in_array($product_type, ['3','5','6','7','8','9','11','13','14','15','16','17','18','19','20'])) { | |||||
| 200 | $_show_actions_top = true; | |||||
| 201 | if($product_type == 14 && $_button_pos == 'outside'){ | |||||
| 202 | $_show_actions_top = false; | |||||
| 203 | } | |||||
| 204 | if($product_type >= 13){ | |||||
| 205 | $_product_inner_class = ' tb-hover-content with-link'; | |||||
| 206 | } | |||||
| 207 | ||||||
| 208 | | |||||
| 209 | $_product_inner_class .= ' css-bottom-iconcart icon-absolute'; | |||||
| 210 | } | |||||
| 211 | if($product_type == 14 && $_icon_only1){ | |||||
| 212 | $_product_inner_class .= ' show-cart-icon'; | |||||
| 213 | } | |||||
| 214 | if($product_type == 14 && $_button_pos != 'outside'){ | |||||
| 215 | $_product_inner_class .= ' button-pos-'.$_button_pos; | |||||
| 216 | } | |||||
| 217 | if($product_type == 15 && $_icon_only2 && $_button_action != 'top'){ | |||||
| 218 | $_product_inner_class .= ' show-cart-icon'; | |||||
| 219 | } | |||||
| 220 | if($product_type == 15 && $_button_action != 'top') { | |||||
| 221 | $_product_inner_class .= ' button-pos-center'; | |||||
| 222 | } | |||||
| 223 | if($product_type == 18) { | |||||
| 224 | $_product_inner_class .= ' icon-absolute show-cart-icon'; | |||||
| 225 | } | |||||
| 226 | if($product_type == 20 && $_box_style != 'box_full') { | |||||
| 227 | $_product_inner_class .= ' css-bottom-iconcart icon-absolute'; | |||||
| 228 | } | |||||
| 229 | if($product_type == 20 && $_box_style == 'box_full'){ | |||||
| 230 | $_show_actions_top = false; | |||||
| 231 | } | |||||
| 232 | } | |||||
| 233 | if($_show_actions_top): ?> | |||||
| 234 | <div class="product-item-inner<?= $_product_inner_class;?>"> | |||||
| 235 | <?php if(in_array($product_type, $newType)):?> | |||||
| 236 | <a aria-label="post content" href="<?php echo $_product->getProductUrl() ?>" class="porto-tb-link"></a> | |||||
| 237 | <?php endif;?> | |||||
| 238 | <?php if($product_type == 15 || $product_type == 16 || $product_type == 18):?> | |||||
| 239 | <?php if(($product_type == 15 && $_button_action == 'center') || ($product_type == 18 && $_content_pos2 == 'default') || ($product_type == 18 && $_content_pos2 == 'center')):?> | |||||
| 240 | <div class="porto-section content-top"> | |||||
| 241 | <?php $_productNameStripped = $block->stripTags($_product->getName(), null, true); ?> | |||||
| 242 | <strong class="product name product-item-name"> | |||||
| 243 | <a class="product-item-link" | |||||
| 244 | href="<?php echo $_product->getProductUrl() ?>"> | |||||
| 245 | <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> | |||||
| 246 | </a> | |||||
| 247 | </strong> | |||||
| 248 | <?php if($_category_config['rating_star']): ?> | |||||
| 249 | <?php | |||||
| 250 | $review_html = $block->getReviewsSummaryHtml($_product, $templateType); | |||||
| 251 | ?> | |||||
| 252 | <?php if($review_html): ?> | |||||
| 253 | <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> | |||||
| 254 | <?php else: ?> | |||||
| 255 | <div class="product-reviews-summary short"> | |||||
| 256 | <div class="rating-summary"> | |||||
| 257 | <span class="label"><span>Rating:</span></span> | |||||
| 258 | <div class="rating-result" title="0%"> | |||||
| 259 | <span style="width:0"><span>0%</span></span> | |||||
| 260 | </div> | |||||
| 261 | </div> | |||||
| 262 | </div> | |||||
| 263 | <?php endif; ?> | |||||
| 264 | <?php endif; ?> | |||||
| 265 | </div> | |||||
| 266 | <?php endif; ?> | |||||
| 267 | <div class="product details product-item-details porto-section<?php if($_button_action == 'top' || $_button_action == 'hide' || $product_type == 16):?> product-content<?php endif;?><?php if($product_type == 15 && $_button_action == 'center'):?> content-bottom<?php endif;?><?php if($product_type == 16 && $_block_pos == 'full'):?> d-flex justify-content-center flex-column<?php endif;?>"> | |||||
| 268 | <?php if($_button_action == 'top' || $_button_action == 'hide' || $product_type == 16 || ($product_type == 18 && $_content_pos2 == 'top') || ($product_type == 18 && $_content_pos2 == 'bottom')):?> | |||||
| 269 | <?php $_productNameStripped = $block->stripTags($_product->getName(), null, true); ?> | |||||
| 270 | <strong class="product name product-item-name"> | |||||
| 271 | <a class="product-item-link" | |||||
| 272 | href="<?php echo $_product->getProductUrl() ?>"> | |||||
| 273 | <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> | |||||
| 274 | </a> | |||||
| 275 | </strong> | |||||
| 276 | <?php if($_category_config['rating_star']): ?> | |||||
| 277 | <?php | |||||
| 278 | $review_html = $block->getReviewsSummaryHtml($_product, $templateType); | |||||
| 279 | ?> | |||||
| 280 | <?php if($review_html): ?> | |||||
| 281 | <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> | |||||
| 282 | <?php else: ?> | |||||
| 283 | <div class="product-reviews-summary short"> | |||||
| 284 | <div class="rating-summary"> | |||||
| 285 | <span class="label"><span>Rating:</span></span> | |||||
| 286 | <div class="rating-result" title="0%"> | |||||
| 287 | <span style="width:0"><span>0%</span></span> | |||||
| 288 | </div> | |||||
| 289 | </div> | |||||
| 290 | </div> | |||||
| 291 | <?php endif; ?> | |||||
| 292 | <?php endif; ?> | |||||
| 293 | <?php endif;?> | |||||
| 294 | ||||||
| 295 | <?php if($_category_config['product_price']): ?> | |||||
| 296 | <?php echo $block->getProductPrice($_product) ?> | |||||
| 297 | <?php endif; ?> | |||||
| 298 | <?php echo $block->getProductDetailsHtml($_product); ?> | |||||
| 299 | <?php if($product_type == 16):?> | |||||
| 128 | <div class="actions-primary"> | 300 | <div class="actions-primary"> | |||
| 129 | <?php if ($_product->isSaleable()): ?> | 301 | <?php if ($_product->isSaleable()): ?> | |||
| 130 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | 302 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | |||
| 131 | <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> | 303 | <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> | |||
| 132 | <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> | 304 | <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> | |||
| 133 | <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | 305 | <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | |||
| 134 | <?php echo $block->getBlockHtml('formkey')?> | 306 | <?php echo $block->getBlockHtml('formkey')?> | |||
| 135 | <button type="submit" | 307 | <button type="submit" | |||
| 136 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | 308 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | |||
| 137 | class="action tocart primary"> | 309 | class="action tocart primary"> | |||
| 138 | <span><?php echo __('Add to Cart') ?></span> | 310 | <span><?php echo __('Add to Cart') ?></span> | |||
| 139 | </button> | 311 | </button> | |||
| 140 | </form> | 312 | </form> | |||
| 141 | <?php else: ?> | 313 | <?php else: ?> | |||
| 142 | <?php if ($_product->getIsSalable()): ?> | 314 | <?php if ($_product->getIsSalable()): ?> | |||
| 143 | <div class="stock available"><span><?php echo __('In stock') ?></span></div> | 315 | <div class="stock available"><span><?php echo __('In stock') ?></span></div> | |||
| 144 | <?php else: ?> | 316 | <?php else: ?> | |||
| 145 | <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> | 317 | <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> | |||
| 146 | <?php endif; ?> | 318 | <?php endif; ?> | |||
| 147 | <?php endif; ?> | 319 | <?php endif; ?> | |||
| 148 | </div> | 320 | </div> | |||
| 321 | <?php endif;?> | |||||
| 322 | </div> | |||||
| 323 | <?php endif; ?> | |||||
| 324 | <div class="product actions product-item-actions<?php if($product_type == 14 || ($product_type == 15 && $_button_action != 'top') || $product_type == 16 || $product_type == 17):?> d-flex align-items-center justify-content-center<?php endif;?><?php if($product_type == 17 && $_quantity_pos == 'image_center'):?> actions-center<?php endif;?>"> | |||||
| 325 | <?php | |||||
| 326 | $c_show_cart = false; | |||||
| 327 | if($product_type != 16){ | |||||
| 328 | $c_show_cart = true; | |||||
| 329 | } | |||||
| 330 | if($product_type == 17 && ($_quantity_pos =='below' || $_quantity_pos =='above')) { | |||||
| 331 | $c_show_cart = false; | |||||
| 332 | } | |||||
| 333 | if($product_type == 19 && $_link_pos != 'image') { | |||||
| 334 | $c_show_cart = false; | |||||
| 335 | } | |||||
| 336 | ?> | |||||
| 337 | <?php if($c_show_cart):?> | |||||
| 338 | <div class="actions-primary"> | |||||
| 339 | <?php if ($_product->isSaleable()): ?> | |||||
| 340 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | |||||
| 341 | <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post" class="d-flex flex-column flex-sm-row"> | |||||
| 342 | <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> | |||||
| 343 | <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | |||||
| 344 | <?php if($product_type == 17 && ($_quantity_pos == 'image_bottom' || $_quantity_pos == 'image_center')):?> | |||||
| 345 | <div class="qty-box"> | |||||
| 346 | <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> | |||||
| 347 | <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/> | |||||
| 348 | <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> | |||||
| 349 | </div> | |||||
| 350 | <?php endif;?> | |||||
| 351 | <?php echo $block->getBlockHtml('formkey')?> | |||||
| 352 | <button type="submit" | |||||
| 353 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | |||||
| 354 | class="action tocart primary"> | |||||
| 355 | <span><?php echo __('Add to Cart') ?></span> | |||||
| 356 | </button> | |||||
| 357 | </form> | |||||
| 358 | <?php else: ?> | |||||
| 359 | <?php if ($_product->getIsSalable()): ?> | |||||
| 360 | <div class="stock available"><span><?php echo __('In stock') ?></span></div> | |||||
| 361 | <?php else: ?> | |||||
| 362 | <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> | |||||
| 363 | <?php endif; ?> | |||||
| 364 | <?php endif; ?> | |||||
| 365 | </div> | |||||
| 366 | <?php endif;?> | |||||
| 149 | <?php if ($block->getMode() == 'grid'): ?> | 367 | <?php if ($block->getMode() == 'grid'): ?> | |||
| 150 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | 368 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | |||
| 151 | <?php if($_category_config['addtowishlist']): ?> | 369 | <?php if($_category_config['addtowishlist']): ?> | |||
| 152 | <a href="#" | 370 | <a href="#" | |||
| 153 | class="action towishlist actions-secondary" | 371 | class="action towishlist actions-secondary" | |||
| 154 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 372 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 155 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 373 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 156 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | 374 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | |||
| 157 | data-action="add-to-wishlist" | 375 | data-action="add-to-wishlist" | |||
| 158 | role="button"> | 376 | role="button"> | |||
| 159 | <span><?php echo __('Add to Wish List') ?></span> | 377 | <span><?php echo __('Add to Wish List') ?></span> | |||
| 160 | </a> | 378 | </a> | |||
| 161 | <?php endif; ?> | 379 | <?php endif; ?> | |||
| 162 | <?php endif; ?> | 380 | <?php endif; ?> | |||
| 163 | <?php endif; ?> | 381 | <?php endif; ?> | |||
| 164 | <?php if($_category_config['addtocompare']): ?> | 382 | <?php if($_category_config['addtocompare']): ?> | |||
| 165 | <?php | 383 | <?php | |||
| 166 | $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); | 384 | $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); | |||
| 167 | ?> | 385 | ?> | |||
| 168 | <a href="#" | 386 | <a href="#" | |||
| 169 | class="action tocompare actions-secondary" | 387 | class="action tocompare actions-secondary" | |||
| 170 | title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | 388 | title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||
| 171 | aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | 389 | aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||
| 172 | data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' | 390 | data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' | |||
| 173 | role="button"> | 391 | role="button"> | |||
| 174 | <span><?php echo __('Add to Compare') ?></span> | 392 | <span><?php echo __('Add to Compare') ?></span> | |||
| 175 | </a> | 393 | </a> | |||
| 176 | <?php endif; ?> | 394 | <?php endif; ?> | |||
| 177 | </div> | 395 | </div> | |||
| 178 | </div> | 396 | </div> | |||
| 179 | <?php endif; ?> | 397 | <?php endif; ?> | |||
| 398 | <?php if($product_type != 13 && $product_type != 14 && $product_type != 17 && $product_type != 18 && $product_type != 20): ?> | |||||
| 180 | <!-- Dailydeal Product data --> | 399 | <!-- Dailydeal Product data --> | |||
| 181 | <?php if($_dailydealhelper->isDealProduct($_product->getId())) : ?> | 400 | <?php if($_dailydealhelper->isDealProduct($_product->getId())) : ?> | |||
| 182 | <?php $unique_id = rtrim(base64_encode(md5(microtime())),"="); ?> | 401 | <?php $unique_id = rtrim(base64_encode(md5(microtime())),"="); ?> | |||
| 183 | <input type="hidden" id="todate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealToDate($_product->getSku()); ?>" > | 402 | <input type="hidden" id="todate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealToDate($_product->getSku()); ?>" > | |||
| 184 | <input type="hidden" id="fromdate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealFromDate($_product->getSku()); ?>"> | 403 | <input type="hidden" id="fromdate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealFromDate($_product->getSku()); ?>"> | |||
| 185 | <div class="sw-dailydeal-wrapper" style="display:none;" data-unique-id="<?php echo $unique_id; ?>"> | 404 | <div class="sw-dailydeal-wrapper" style="display:none;" data-unique-id="<?php echo $unique_id; ?>"> | |||
| 186 | <div class="sw-dailydeal"> | 405 | <div class="sw-dailydeal"> | |||
| 187 | <p id="expired_<?php echo $unique_id; ?>"></p> | 406 | <p id="expired_<?php echo $unique_id; ?>"></p> | |||
| 188 | <div class="countdowncontainer countdowncontainer_<?php echo $unique_id; ?>" style="display:none;"> | 407 | <div class="countdowncontainer countdowncontainer_<?php echo $unique_id; ?>" style="display:none;"> | |||
| 189 | <span class="dailydeal-label"> | 408 | <span class="dailydeal-label"> | |||
| 190 | <?php echo __('Ends In:'); ?> | 409 | <?php echo __('Ends In:'); ?> | |||
| 191 | </span> | 410 | </span> | |||
| 192 | <span class="number-wrapper"> | 411 | <span class="number-wrapper"> | |||
| 193 | <div class="line"></div> | 412 | <div class="line"></div> | |||
| 194 | <span class="number day"><p id="countdown_days_<?php echo $unique_id; ?>">00</p></span> | 413 | <span class="number day"><p id="countdown_days_<?php echo $unique_id; ?>">00</p></span> | |||
| 195 | <div class="caption"><?php echo __('Day(s), '); ?></div> | 414 | <div class="caption"><?php echo __('Day(s), '); ?></div> | |||
| 196 | </span> | 415 | </span> | |||
| 197 | 416 | |||||
| 198 | <span class="number-wrapper"> | 417 | <span class="number-wrapper"> | |||
| 199 | <div class="line"></div> | 418 | <div class="line"></div> | |||
| 200 | <span class="number hour"><p id="countdown_hours_<?php echo $unique_id; ?>">00</p></span> | 419 | <span class="number hour"><p id="countdown_hours_<?php echo $unique_id; ?>">00</p></span> | |||
| 201 | <div class="caption">:</div> | 420 | <div class="caption">:</div> | |||
| 202 | </span> | 421 | </span> | |||
| 203 | 422 | |||||
| 204 | <span class="number-wrapper"> | 423 | <span class="number-wrapper"> | |||
| 205 | <div class="line"></div> | 424 | <div class="line"></div> | |||
| 206 | <span class="number min"><p id="countdown_minutes_<?php echo $unique_id; ?>">00</p></span> | 425 | <span class="number min"><p id="countdown_minutes_<?php echo $unique_id; ?>">00</p></span> | |||
| 207 | <div class="caption">:</div> | 426 | <div class="caption">:</div> | |||
| 208 | </span> | 427 | </span> | |||
| 209 | 428 | |||||
| 210 | <span class="number-wrapper"> | 429 | <span class="number-wrapper"> | |||
| 211 | <div class="line"></div> | 430 | <div class="line"></div> | |||
| 212 | <span class="number sec"><p id="countdown_seconds_<?php echo $unique_id; ?>">00</p></span> | 431 | <span class="number sec"><p id="countdown_seconds_<?php echo $unique_id; ?>">00</p></span> | |||
| 213 | <div class="caption"></div> | 432 | <div class="caption"></div> | |||
| 214 | </span> | 433 | </span> | |||
| 215 | </div> | 434 | </div> | |||
| 216 | </div> | 435 | </div> | |||
| 217 | </div> | 436 | </div> | |||
| 218 | <?php endif; ?> | 437 | <?php endif; ?> | |||
| 219 | <!-- Dailydeal Product End --> | 438 | <!-- Dailydeal Product End --> | |||
| 439 | <?php endif;?> | |||||
| 440 | </div> | |||||
| 441 | </div> | |||||
| 442 | <?php if($product_type != '15' && $product_type != 16 && $product_type != '18'): ?> | |||||
| 443 | <div class="product details product-item-details porto-section product-content<?php if($product_type == '17' && $_quantity_pos =='above'):?> qty-above d-flex flex-column align-items-center<?php endif;?><?php if($product_type == '19' && ($_link_pos == 'top' || $_link_pos == 'hidden')){?> show-cartlink-top<?php }?>"> | |||||
| 444 | <?php if($product_type == '13' || $product_type == '14' || $product_type == '17' || $product_type == '20'): ?> | |||||
| 445 | <!-- Dailydeal Product data --> | |||||
| 446 | <?php if($_dailydealhelper->isDealProduct($_product->getId())) : ?> | |||||
| 447 | <?php $unique_id = rtrim(base64_encode(md5(microtime())),"="); ?> | |||||
| 448 | <input type="hidden" id="todate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealToDate($_product->getSku()); ?>" > | |||||
| 449 | <input type="hidden" id="fromdate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealFromDate($_product->getSku()); ?>"> | |||||
| 450 | <div class="sw-dailydeal-wrapper product-type-countdown2" style="display:none;" data-unique-id="<?php echo $unique_id; ?>"> | |||||
| 451 | <div class="sw-dailydeal"> | |||||
| 452 | <p id="expired_<?php echo $unique_id; ?>"></p> | |||||
| 453 | <div class="countdowncontainer countdowncontainer_<?php echo $unique_id; ?>" style="display:none;"> | |||||
| 454 | <span class="number-wrapper"> | |||||
| 455 | <div class="line"></div> | |||||
| 456 | <span class="number day"><p id="countdown_days_<?php echo $unique_id; ?>">00</p></span> | |||||
| 457 | <div class="caption"><?php echo __('Days'); ?></div> | |||||
| 458 | </span> | |||||
| 459 | <span class="number-wrapper"> | |||||
| 460 | <div class="line"></div> | |||||
| 461 | <span class="number hour"><p id="countdown_hours_<?php echo $unique_id; ?>">00</p></span> | |||||
| 462 | <div class="caption"><?php echo __('Hours'); ?></div> | |||||
| 463 | </span> | |||||
| 464 | <span class="number-wrapper"> | |||||
| 465 | <div class="line"></div> | |||||
| 466 | <span class="number min"><p id="countdown_minutes_<?php echo $unique_id; ?>">00</p></span> | |||||
| 467 | <div class="caption"><?php echo __('Min'); ?></div> | |||||
| 468 | </span> | |||||
| 469 | <span class="number-wrapper"> | |||||
| 470 | <div class="line"></div> | |||||
| 471 | <span class="number sec"><p id="countdown_seconds_<?php echo $unique_id; ?>">00</p></span> | |||||
| 472 | <div class="caption"><?php echo __('Sec'); ?></div> | |||||
| 473 | </span> | |||||
| 474 | </div> | |||||
| 475 | </div> | |||||
| 220 | </div> | 476 | </div> | |||
| 221 | <div class="product details product-item-details"> | 477 | <?php endif; ?> | |||
| 478 | <!-- Dailydeal Product End --> | |||||
| 479 | <?php endif;?> | |||||
| 222 | <?php | 480 | <?php | |||
| 223 | $_productNameStripped = $block->stripTags($_product->getName(), null, true); | 481 | $_productNameStripped = $block->stripTags($_product->getName(), null, true); | |||
| 224 | ?> | 482 | ?> | |||
| 483 | <?php if($product_type == '13' || $product_type == '14' || $product_type == '19' || $product_type == '20'): ?> | |||||
| 484 | <?php echo $block->getProductDetailsHtml($_product); ?> | |||||
| 485 | <?php endif;?> | |||||
| 225 | <strong class="product name product-item-name"> | 486 | <strong class="product name product-item-name"> | |||
| 226 | <a class="product-item-link" | 487 | <a class="product-item-link" | |||
| 227 | href="<?php echo $_product->getProductUrl() ?>"> | 488 | href="<?php echo $_product->getProductUrl() ?>"> | |||
| 228 | <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> | 489 | <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> | |||
| 229 | </a> | 490 | </a> | |||
| 230 | </strong> | 491 | </strong> | |||
| 231 | <?php if($_category_config['rating_star']): ?> | 492 | <?php if($_category_config['rating_star']): ?> | |||
| 232 | <?php | 493 | <?php | |||
| 233 | $review_html = $block->getReviewsSummaryHtml($_product, $templateType); | 494 | $review_html = $block->getReviewsSummaryHtml($_product, $templateType); | |||
| 234 | ?> | 495 | ?> | |||
| 235 | <?php if($review_html): ?> | 496 | <?php if($review_html): ?> | |||
| 236 | <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> | 497 | <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> | |||
| 237 | <?php else: ?> | 498 | <?php else: ?> | |||
| 238 | <div class="product-reviews-summary short"> | 499 | <div class="product-reviews-summary short"> | |||
| 239 | <div class="rating-summary"> | 500 | <div class="rating-summary"> | |||
| 240 | <span class="label"><span>Rating:</span></span> | 501 | <span class="label"><span>Rating:</span></span> | |||
| 241 | <div class="rating-result" title="0%"> | 502 | <div class="rating-result" title="0%"> | |||
| 242 | <span style="width:0"><span>0%</span></span> | 503 | <span style="width:0"><span>0%</span></span> | |||
| 243 | </div> | 504 | </div> | |||
| 244 | </div> | 505 | </div> | |||
| 245 | </div> | 506 | </div> | |||
| 246 | <?php endif; ?> | 507 | <?php endif; ?> | |||
| 247 | <?php endif; ?> | 508 | <?php endif; ?> | |||
| 248 | 509 | |||||
| 249 | <?php if ($showDescription):?> | 510 | <?php if ($showDescription):?> | |||
| 250 | <div class="product description product-item-description"> | 511 | <div class="product description product-item-description"> | |||
| 251 | <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> | 512 | <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> | |||
| 252 | <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" | 513 | <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" | |||
| 253 | class="action more"><?php echo __('Learn More') ?></a> | 514 | class="action more"><?php echo __('Learn More') ?></a> | |||
| 254 | </div> | 515 | </div> | |||
| 255 | <?php endif; ?> | 516 | <?php endif; ?> | |||
| 256 | <?php if($_category_config['product_price']): ?> | 517 | <?php if($_category_config['product_price']): ?> | |||
| 257 | <?php echo $block->getProductPrice($_product) ?> | 518 | <?php echo $block->getProductPrice($_product) ?> | |||
| 258 | <?php endif; ?> | 519 | <?php endif; ?> | |||
| 520 | <?php if($product_type != '13' && $product_type != '14' && $product_type != '19' && $product_type != '20'): ?> | |||||
| 259 | <?php echo $block->getProductDetailsHtml($_product); ?> | 521 | <?php echo $block->getProductDetailsHtml($_product); ?> | |||
| 260 | 522 | <?php endif; ?> | ||||
| 261 | <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?> | 523 | <?php | |||
| 262 | <div class="product-item-inner | 524 | $_product_show_actions = true; | |||
| 263 | <div class="product actions product-item-actions"> | 525 | $_product_details_inner_class = ''; | |||
| 526 | if(in_array($product_type, ['3','5','6','7','8','9','11','13','14','17','19','20'])) { | |||||
| 527 | $_product_show_actions = false; | |||||
| 528 | if($product_type == '14' && $_button_pos =='outside'){ | |||||
| 529 | $_product_show_actions = true; | |||||
| 530 | $_product_details_inner_class .= ' button-pos'.$_button_pos; | |||||
| 531 | } | |||||
| 532 | if($product_type == '14' && $_icon_only1 ) { | |||||
| 533 | $_product_details_inner_class .= ' show-cart-icon'; | |||||
| 534 | } | |||||
| 535 | if($product_type == '17' && ($_quantity_pos =='below' || $_quantity_pos =='above')){ | |||||
| 536 | $_product_show_actions = true; | |||||
| 537 | } | |||||
| 538 | if($product_type == '19' && ($_link_pos == 'default' || $_link_pos == 'top')){ | |||||
| 539 | $_product_show_actions = true; | |||||
| 540 | } | |||||
| 541 | if($product_type == '20' && $_box_style == 'box_full'){ | |||||
| 542 | $_product_show_actions = true; | |||||
| 543 | } | |||||
| 544 | } | |||||
| 545 | if($_product_show_actions): ?> | |||||
| 546 | <div class="product-item-inner<?=$_product_details_inner_class;?>"> | |||||
| 547 | <?php if($product_type == '20' && $_box_style == 'box_full'){?> | |||||
| 548 | <div class="product description product-item-description"> | |||||
| 549 | <?php | |||||
| 550 | $length = 118; | |||||
| 551 | $shortContent = $_product->getShortDescription(); | |||||
| 552 | echo $shortContent = strip_tags((strlen($shortContent) > $length) ? substr($shortContent,0,$length).'...' : $shortContent); | |||||
| 553 | ?> | |||||
| 554 | </div> | |||||
| 555 | <?php }?> | |||||
| 556 | <div class="product actions product-item-actions<?php if(($product_type == '14' && $_button_pos == 'outside') || ($product_type == '20' && $_box_style == 'box_full')):?> d-flex align-items-center justify-content-center<?php endif;?>"> | |||||
| 264 | <?php if ($block->getMode() == 'grid'): ?> | 557 | <?php if ($block->getMode() == 'grid'): ?> | |||
| 265 | <?php if($_category_config['addtowishlist'] && $product_type != | 558 | <?php if($_category_config['addtowishlist'] && $product_type != '4' && $product_type != '17' && $product_type != '19'): ?> | |||
| 266 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | 559 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | |||
| 267 | <a href="#" | 560 | <a href="#" | |||
| 268 | class="action towishlist actions-secondary" | 561 | class="action towishlist actions-secondary" | |||
| 269 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 562 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 270 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 563 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 271 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | 564 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | |||
| 272 | data-action="add-to-wishlist" | 565 | data-action="add-to-wishlist" | |||
| 273 | role="button"> | 566 | role="button"> | |||
| 274 | <span><?php echo __('Add to Wish List') ?></span> | 567 | <span><?php echo __('Add to Wish List') ?></span> | |||
| 275 | </a> | 568 | </a> | |||
| 276 | <?php endif; ?> | 569 | <?php endif; ?> | |||
| 277 | <?php endif; ?> | 570 | <?php endif; ?> | |||
| 278 | <?php endif; ?> | 571 | <?php endif; ?> | |||
| 279 | <div class="actions-primary"> | 572 | <div class="actions-primary"> | |||
| 280 | <?php if ($_product->isSaleable()): ?> | 573 | <?php if ($_product->isSaleable()): ?> | |||
| 281 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | 574 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | |||
| 282 | <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post" | 575 | <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post" class="d-flex flex-column flex-sm-row"> | |||
| 283 | <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> | 576 | <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> | |||
| 284 | <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | 577 | <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | |||
| 285 | <?php if($product_type == 10 | 578 | <?php if($product_type == 10 || $product_type == 17):?> | |||
| 286 | <div class="qty-box"> | 579 | <div class="qty-box"> | |||
| 287 | <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> | 580 | <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> | |||
| 288 | <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/> | 581 | <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/> | |||
| 289 | <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> | 582 | <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> | |||
| 290 | </div> | 583 | </div> | |||
| 291 | <?php endif;?> | 584 | <?php endif;?> | |||
| 292 | <?php echo $block->getBlockHtml('formkey')?> | 585 | <?php echo $block->getBlockHtml('formkey')?> | |||
| 293 | <button type="submit" | 586 | <button type="submit" | |||
| 294 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | 587 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | |||
| 295 | class="action tocart primary"> | 588 | class="action tocart primary"> | |||
| 296 | <span><?php echo __('Add to Cart') ?></span> | 589 | <span><?php echo __('Add to Cart') ?></span> | |||
| 297 | </button> | 590 | </button> | |||
| 298 | </form> | 591 | </form> | |||
| 299 | <?php else: ?> | 592 | <?php else: ?> | |||
| 300 | <?php if ($_product->getIsSalable()): ?> | 593 | <?php if ($_product->getIsSalable()): ?> | |||
| 301 | <div class="stock available"><span><?php echo __('In stock') ?></span></div> | 594 | <div class="stock available"><span><?php echo __('In stock') ?></span></div> | |||
| 302 | <?php else: ?> | 595 | <?php else: ?> | |||
| 303 | <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> | 596 | <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> | |||
| 304 | <?php endif; ?> | 597 | <?php endif; ?> | |||
| 305 | <?php endif; ?> | 598 | <?php endif; ?> | |||
| 306 | </div> | 599 | </div> | |||
| 307 | <?php if ($block->getMode() == 'grid' | 600 | <?php if ($block->getMode() == 'grid' && $product_type != '17' && $product_type != '19'): ?> | |||
| 308 | <?php if($_category_config['addtowishlist'] && $product_type == | 601 | <?php if($_category_config['addtowishlist'] && $product_type == '4'): ?> | |||
| 309 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | 602 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | |||
| 310 | <a href="#" | 603 | <a href="#" | |||
| 311 | class="action towishlist actions-secondary" | 604 | class="action towishlist actions-secondary" | |||
| 312 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 605 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 313 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 606 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 314 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | 607 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | |||
| 315 | data-action="add-to-wishlist" | 608 | data-action="add-to-wishlist" | |||
| 316 | role="button"> | 609 | role="button"> | |||
| 317 | <span><?php echo __('Add to Wish List') ?></span> | 610 | <span><?php echo __('Add to Wish List') ?></span> | |||
| 318 | </a> | 611 | </a> | |||
| 319 | <?php endif; ?> | 612 | <?php endif; ?> | |||
| 320 | <?php endif; ?> | 613 | <?php endif; ?> | |||
| 321 | <?php endif; ?> | 614 | <?php endif; ?> | |||
| 322 | <?php if ($block->getMode() == 'list'): ?> | 615 | <?php if ($block->getMode() == 'list'): ?> | |||
| 323 | <?php if($_category_config['addtowishlist']): ?> | 616 | <?php if($_category_config['addtowishlist']): ?> | |||
| 324 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | 617 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | |||
| 325 | <a href="#" | 618 | <a href="#" | |||
| 326 | class="action towishlist actions-secondary" | 619 | class="action towishlist actions-secondary" | |||
| 327 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 620 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 328 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 621 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 329 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | 622 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | |||
| 330 | data-action="add-to-wishlist" | 623 | data-action="add-to-wishlist" | |||
| 331 | role="button"> | 624 | role="button"> | |||
| 332 | <span><?php echo __('Add to Wish List') ?></span> | 625 | <span><?php echo __('Add to Wish List') ?></span> | |||
| 333 | </a> | 626 | </a> | |||
| 334 | <?php endif; ?> | 627 | <?php endif; ?> | |||
| 335 | <?php endif; ?> | 628 | <?php endif; ?> | |||
| 336 | <?php endif; ?> | 629 | <?php endif; ?> | |||
| 337 | <?php if($_category_config['addtocompare'] | 630 | <?php if($_category_config['addtocompare'] && $product_type != '17' && $product_type != '19'): ?> | |||
| 338 | <?php | 631 | <?php | |||
| 339 | $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); | 632 | $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); | |||
| 340 | ?> | 633 | ?> | |||
| 341 | <a href="#" | 634 | <a href="#" | |||
| 342 | class="action tocompare actions-secondary" | 635 | class="action tocompare actions-secondary" | |||
| 343 | title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | 636 | title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||
| 344 | aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | 637 | aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||
| 345 | data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' | 638 | data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' | |||
| 346 | role="button"> | 639 | role="button"> | |||
| 347 | <span><?php echo __('Add to Compare') ?></span> | 640 | <span><?php echo __('Add to Compare') ?></span> | |||
| 348 | </a> | 641 | </a> | |||
| 349 | <?php endif; ?> | 642 | <?php endif; ?> | |||
| 350 | </div> | 643 | </div> | |||
| 351 | </div> | 644 | </div> | |||
| 352 | <?php endif; ?> | 645 | <?php endif; ?> | |||
| 353 | </div> | 646 | </div> | |||
| 647 | <?php endif;?> | |||||
| 648 | </div> | |||||
| 354 | </div> | 649 | </div> | |||
| 355 | <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?> | 650 | <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?> | |||
| 356 | <?php endforeach; ?> | 651 | <?php endforeach; ?> | |||
| 357 | </ol> | 652 | </ol> | |||
| 358 | </div> | 653 | </div> | |||
| 359 | <?php if(isset($_inscroll) && $_inscroll && isset($_inscrollAjax) && $_inscrollAjax):?> | 654 | <?php if(isset($_inscroll) && $_inscroll && isset($_inscrollAjax) && $_inscrollAjax):?> | |||
| 360 | <div class="infinite-loader<?php if($_inscroll_mode == '2'):?> scrolling<?php endif; ?>"><a href="javascript:void(0)" class="loading" style="display: none;"><?php echo __("Loading ..."); ?></a><a href="javascript:void(0)" class="btn-load-more"><?php echo __("Load More ..."); ?></a></div> | 655 | <div class="infinite-loader<?php if($_inscroll_mode == '2'):?> scrolling<?php endif; ?>"><a href="javascript:void(0)" class="loading" style="display: none;"><?php echo __("Loading ..."); ?></a><a href="javascript:void(0)" class="btn-load-more"><?php echo __("Load More ..."); ?></a></div> | |||
| 361 | <?php endif;?> | 656 | <?php endif;?> | |||
| 362 | <?php echo $block->getToolbarHtml() ?> | 657 | <?php echo $block->getToolbarHtml() ?> | |||
| 363 | <?php if (!$block->isRedirectToCartEnabled()) : ?> | 658 | <?php if (!$block->isRedirectToCartEnabled()) : ?> | |||
| 364 | <script type="text/x-magento-init"> | 659 | <script type="text/x-magento-init"> | |||
| 365 | { | 660 | { | |||
| 366 | "[data-role=tocart-form], .form.map.checkout": { | 661 | "[data-role=tocart-form], .form.map.checkout": { | |||
| 367 | "catalogAddToCart": {} | 662 | "catalogAddToCart": {} | |||
| 368 | } | 663 | } | |||
| 369 | } | 664 | } | |||
| 370 | </script> | 665 | </script> | |||
| 371 | <?php endif; ?> | 666 | <?php endif; ?> | |||
| 372 | <?php if ($block->getMode() == 'grid'): ?> | 667 | <?php if ($block->getMode() == 'grid'): ?> | |||
| 373 | <script type="text/javascript"> | 668 | <script type="text/javascript"> | |||
| 374 | require([ | 669 | require([ | |||
| 375 | 'jquery' | 670 | 'jquery' | |||
| 376 | ], function ($) { | 671 | ], function ($) { | |||
| 672 | <?php if($product_type == '20'){?> | |||||
| 673 | window.setTimeout(function(){ | |||||
| 674 | $( '.product-item-info .effect-bhesfd' ).each( function() { | |||||
| 675 | var $item = $( this ), | |||||
| 676 | $detail = $item.find( '.product-item-details .product-item-inner' ), | |||||
| 677 | height = $item.height() + $detail.height() + 32; | |||||
| 678 | $item.find( '>.content-shadow' ).height( height ); | |||||
| 679 | $( window ).on( 'resize', function() { | |||||
| 680 | $detail = $item.find( '.product-item-details .product-item-inner' ); | |||||
| 681 | height = $item.height() + $detail.height() + 32; | |||||
| 682 | $item.find('>.content-shadow').height( height ); | |||||
| 683 | } ); | |||||
| 684 | }); | |||||
| 685 | },500); | |||||
| 686 | <?php }?> | |||||
| 377 | $('.main .products.grid .product-items li.product-item:nth-child(2n)').addClass('nth-child-2n'); | 687 | $('.main .products.grid .product-items li.product-item:nth-child(2n)').addClass('nth-child-2n'); | |||
| 378 | $('.main .products.grid .product-items li.product-item:nth-child(2n+1)').addClass('nth-child-2np1'); | 688 | $('.main .products.grid .product-items li.product-item:nth-child(2n+1)').addClass('nth-child-2np1'); | |||
| 379 | $('.main .products.grid .product-items li.product-item:nth-child(3n)').addClass('nth-child-3n'); | 689 | $('.main .products.grid .product-items li.product-item:nth-child(3n)').addClass('nth-child-3n'); | |||
| 380 | $('.main .products.grid .product-items li.product-item:nth-child(3n+1)').addClass('nth-child-3np1'); | 690 | $('.main .products.grid .product-items li.product-item:nth-child(3n+1)').addClass('nth-child-3np1'); | |||
| 381 | $('.main .products.grid .product-items li.product-item:nth-child(4n)').addClass('nth-child-4n'); | 691 | $('.main .products.grid .product-items li.product-item:nth-child(4n)').addClass('nth-child-4n'); | |||
| 382 | $('.main .products.grid .product-items li.product-item:nth-child(4n+1)').addClass('nth-child-4np1'); | 692 | $('.main .products.grid .product-items li.product-item:nth-child(4n+1)').addClass('nth-child-4np1'); | |||
| 383 | $('.main .products.grid .product-items li.product-item:nth-child(5n)').addClass('nth-child-5n'); | 693 | $('.main .products.grid .product-items li.product-item:nth-child(5n)').addClass('nth-child-5n'); | |||
| 384 | $('.main .products.grid .product-items li.product-item:nth-child(5n+1)').addClass('nth-child-5np1'); | 694 | $('.main .products.grid .product-items li.product-item:nth-child(5n+1)').addClass('nth-child-5np1'); | |||
| 385 | $('.main .products.grid .product-items li.product-item:nth-child(6n)').addClass('nth-child-6n'); | 695 | $('.main .products.grid .product-items li.product-item:nth-child(6n)').addClass('nth-child-6n'); | |||
| 386 | $('.main .products.grid .product-items li.product-item:nth-child(6n+1)').addClass('nth-child-6np1'); | 696 | $('.main .products.grid .product-items li.product-item:nth-child(6n+1)').addClass('nth-child-6np1'); | |||
| 387 | $('.main .products.grid .product-items li.product-item:nth-child(7n)').addClass('nth-child-7n'); | 697 | $('.main .products.grid .product-items li.product-item:nth-child(7n)').addClass('nth-child-7n'); | |||
| 388 | $('.main .products.grid .product-items li.product-item:nth-child(7n+1)').addClass('nth-child-7np1'); | 698 | $('.main .products.grid .product-items li.product-item:nth-child(7n+1)').addClass('nth-child-7np1'); | |||
| 389 | $('.main .products.grid .product-items li.product-item:nth-child(8n)').addClass('nth-child-8n'); | 699 | $('.main .products.grid .product-items li.product-item:nth-child(8n)').addClass('nth-child-8n'); | |||
| 390 | $('.main .products.grid .product-items li.product-item:nth-child(8n+1)').addClass('nth-child-8np1'); | 700 | $('.main .products.grid .product-items li.product-item:nth-child(8n+1)').addClass('nth-child-8np1'); | |||
| 391 | }); | 701 | }); | |||
| 392 | </script> | 702 | </script> | |||
| 393 | <?php endif; ?> | 703 | <?php endif; ?> | |||
| 394 | <?php endif; ?> | 704 | <?php endif; ?> | |||
| 395 | <script type="text/javascript"> | 705 | <script type="text/javascript"> | |||
| 396 | require([ | 706 | require([ | |||
| 397 | 'jquery' | 707 | 'jquery' | |||
| 398 | ], function ($) { | 708 | ], function ($) { | |||
| 399 | var app = { | 709 | var app = { | |||
| 400 | isAppleDevice: function() { | 710 | isAppleDevice: function() { | |||
| 401 | if (navigator.userAgent.match(/(iPhone|iPod|iPad|Safari)/) != null) { | 711 | if (navigator.userAgent.match(/(iPhone|iPod|iPad|Safari)/) != null) { | |||
| 402 | return true; | 712 | return true; | |||
| 403 | } | 713 | } | |||
| 404 | return false; | 714 | return false; | |||
| 405 | } | 715 | } | |||
| 406 | } | 716 | } | |||
| 407 | // Timer for LEFT time for Dailydeal product | 717 | // Timer for LEFT time for Dailydeal product | |||
| 408 | var _second = 1000; | 718 | var _second = 1000; | |||
| 409 | var _minute = _second * 60; | 719 | var _minute = _second * 60; | |||
| 410 | var _hour = _minute * 60; | 720 | var _hour = _minute * 60; | |||
| 411 | var _day = _hour * 24; | 721 | var _day = _hour * 24; | |||
| 412 | var timer; | 722 | var timer; | |||
| 413 | 723 | |||||
| 414 | //Set date as magentodatetime | 724 | //Set date as magentodatetime | |||
| 415 | var date = new Date('<?php echo $_dailydealhelper->getcurrentDate() ?>'); | 725 | var date = new Date('<?php echo $_dailydealhelper->getcurrentDate() ?>'); | |||
| 416 | if (app.isAppleDevice()) { | 726 | if (app.isAppleDevice()) { | |||
| 417 | var mdate = '<?php echo $_dailydealhelper->getcurrentDate() ?>'; | 727 | var mdate = '<?php echo $_dailydealhelper->getcurrentDate() ?>'; | |||
| 418 | var dateParts = mdate.substring(0,10).split('-'); | 728 | var dateParts = mdate.substring(0,10).split('-'); | |||
| 419 | var timePart = mdate.substr(11); | 729 | var timePart = mdate.substr(11); | |||
| 420 | date = dateParts[1] + '/' + dateParts[2] + '/' + dateParts[0] + ' ' + timePart; | 730 | date = dateParts[1] + '/' + dateParts[2] + '/' + dateParts[0] + ' ' + timePart; | |||
| 421 | date = new Date(date); | 731 | date = new Date(date); | |||
| 422 | } | 732 | } | |||
| 423 | var l_date = new Date(); | 733 | var l_date = new Date(); | |||
| 424 | var offset_date = l_date - date; | 734 | var offset_date = l_date - date; | |||
| 425 | 735 | |||||
| 426 | function showRemaining() | 736 | function showRemaining() | |||
| 427 | { | 737 | { | |||
| 428 | $(".sw-dailydeal-wrapper").each(function(){ | 738 | $(".sw-dailydeal-wrapper").each(function(){ | |||
| 429 | var unique_id = $(this).attr("data-unique-id"); | 739 | var unique_id = $(this).attr("data-unique-id"); | |||
| 430 | // get Value of dailydeal product | 740 | // get Value of dailydeal product | |||
| 431 | var cid='countdown_'+unique_id; | 741 | var cid='countdown_'+unique_id; | |||
| 432 | var daysid='countdown_days_'+unique_id; | 742 | var daysid='countdown_days_'+unique_id; | |||
| 433 | var hoursid='countdown_hours_'+unique_id; | 743 | var hoursid='countdown_hours_'+unique_id; | |||
| 434 | var minutesid='countdown_minutes_'+unique_id; | 744 | var minutesid='countdown_minutes_'+unique_id; | |||
| 435 | var secondsid='countdown_seconds_'+unique_id; | 745 | var secondsid='countdown_seconds_'+unique_id; | |||
| 436 | 746 | |||||
| 437 | var startdateid='fromdate_'+unique_id; | 747 | var startdateid='fromdate_'+unique_id; | |||
| 438 | var id='todate_'+unique_id; | 748 | var id='todate_'+unique_id; | |||
| 439 | 749 | |||||
| 440 | var enddate = new Date($('#'+id).val()); | 750 | var enddate = new Date($('#'+id).val()); | |||
| 441 | var dealstartdate=new Date($('#'+startdateid).val()); | 751 | var dealstartdate=new Date($('#'+startdateid).val()); | |||
| 442 | if (app.isAppleDevice() && $('#'+id).val() && $('#'+startdateid).val()) { | 752 | if (app.isAppleDevice() && $('#'+id).val() && $('#'+startdateid).val()) { | |||
| 443 | var ledate = $('#'+id).val(); | 753 | var ledate = $('#'+id).val(); | |||
| 444 | var ledateParts = ledate.substring(0,10).split('-'); | 754 | var ledateParts = ledate.substring(0,10).split('-'); | |||
| 445 | var letimePart = ledate.substr(11); | 755 | var letimePart = ledate.substr(11); | |||
| 446 | enddate = ledateParts[1] + '/' + ledateParts[2] + '/' + ledateParts[0] + ' ' + letimePart; | 756 | enddate = ledateParts[1] + '/' + ledateParts[2] + '/' + ledateParts[0] + ' ' + letimePart; | |||
| 447 | enddate = new Date(enddate).getTime(); | 757 | enddate = new Date(enddate).getTime(); | |||
| 448 | 758 | |||||
| 449 | var lsdate = $('#'+startdateid).val(); | 759 | var lsdate = $('#'+startdateid).val(); | |||
| 450 | var lsdateParts = lsdate.substring(0,10).split('-'); | 760 | var lsdateParts = lsdate.substring(0,10).split('-'); | |||
| 451 | var lstimePart = lsdate.substr(11); | 761 | var lstimePart = lsdate.substr(11); | |||
| 452 | dealstartdate = lsdateParts[1] + '/' + lsdateParts[2] + '/' + lsdateParts[0] + ' ' + lstimePart; | 762 | dealstartdate = lsdateParts[1] + '/' + lsdateParts[2] + '/' + lsdateParts[0] + ' ' + lstimePart; | |||
| 453 | dealstartdate = new Date(dealstartdate).getTime(); | 763 | dealstartdate = new Date(dealstartdate).getTime(); | |||
| 454 | } | 764 | } | |||
| 455 | var currentdate=new Date(); | 765 | var currentdate=new Date(); | |||
| 456 | 766 | |||||
| 457 | //Get Difference between Two dates | 767 | //Get Difference between Two dates | |||
| 458 | var distance = enddate - (currentdate - offset_date); | 768 | var distance = enddate - (currentdate - offset_date); | |||
| 459 | 769 | |||||
| 460 | $('.sw-dailydeal-wrapper').show(); | 770 | $('.sw-dailydeal-wrapper').show(); | |||
| 461 | 771 | |||||
| 462 | if (distance < 0) { | 772 | if (distance < 0) { | |||
| 463 | // clearInterval(timer); | 773 | // clearInterval(timer); | |||
| 464 | $('#expired_'+unique_id).html("<span style='font-size:25px; color:#000;'>EXPIRED!<span>"); | 774 | $('#expired_'+unique_id).html("<span style='font-size:25px; color:#000;'>EXPIRED!<span>"); | |||
| 465 | 775 | |||||
| 466 | } else if(dealstartdate > currentdate) { | 776 | } else if(dealstartdate > currentdate) { | |||
| 467 | $('.countdowncontainer_'+unique_id).hide(); | 777 | $('.countdowncontainer_'+unique_id).hide(); | |||
| 468 | var msg="<span style='font-size:15px; color:#000;'> Coming Soon..<br>Deal Start at:<br>"+$('#'+startdateid).val()+"<span>"; | 778 | var msg="<span style='font-size:15px; color:#000;'> Coming Soon..<br>Deal Start at:<br>"+$('#'+startdateid).val()+"<span>"; | |||
| 469 | $('#expired_'+unique_id).html(msg); | 779 | $('#expired_'+unique_id).html(msg); | |||
| 470 | } else { | 780 | } else { | |||
| 471 | var days = Math.floor(distance / _day); | 781 | var days = Math.floor(distance / _day); | |||
| 472 | var hours = Math.floor((distance % _day) / _hour); | 782 | var hours = Math.floor((distance % _day) / _hour); | |||
| 473 | var minutes = Math.floor((distance % _hour) / _minute); | 783 | var minutes = Math.floor((distance % _hour) / _minute); | |||
| 474 | var seconds = Math.floor((distance % _minute) / _second); | 784 | var seconds = Math.floor((distance % _minute) / _second); | |||
| 475 | 785 | |||||
| 476 | if(hours < 10) | 786 | if(hours < 10) | |||
| 477 | hours = "0" + hours; | 787 | hours = "0" + hours; | |||
| 478 | if(minutes < 10) | 788 | if(minutes < 10) | |||
| 479 | minutes = "0" + minutes; | 789 | minutes = "0" + minutes; | |||
| 480 | if(seconds < 10) | 790 | if(seconds < 10) | |||
| 481 | seconds = "0" + seconds; | 791 | seconds = "0" + seconds; | |||
| 482 | $('.countdowncontainer_'+unique_id).show(); | 792 | $('.countdowncontainer_'+unique_id).show(); | |||
| 483 | $('#'+daysid).html(days); | 793 | $('#'+daysid).html(days); | |||
| 484 | $('#'+hoursid).html(hours); | 794 | $('#'+hoursid).html(hours); | |||
| 485 | $('#'+minutesid).html(minutes); | 795 | $('#'+minutesid).html(minutes); | |||
| 486 | $('#'+secondsid).html(seconds); | 796 | $('#'+secondsid).html(seconds); | |||
| 487 | } | 797 | } | |||
| 488 | }); | 798 | }); | |||
| 489 | } | 799 | } | |||
| 490 | 800 | |||||
| 491 | // Set Interval | 801 | // Set Interval | |||
| 492 | timer = setInterval(function() | 802 | timer = setInterval(function() | |||
| 493 | { | 803 | { | |||
| 494 | showRemaining(); | 804 | showRemaining(); | |||
| 495 | }, 1000); | 805 | }, 1000); | |||
| 496 | }); | 806 | }); | |||
| 497 | </script> | 807 | </script> | |||
| 498 | <?php | 808 | <?php | |||
| 499 | echo $block->getChildHtml('filter_toggle'); | 809 | echo $block->getChildHtml('filter_toggle'); | |||
| 500 | ?> | 810 | ?> |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.